<@ include "lib/macros.html" -@>
<@ extends "api/api.template.html" @>

<@ block additional @>

  <@ block usage @>
<h2 id="usage">Usage</h2>
  <@ if doc.usage @>
<$ doc.usage $>
  <@ else @>
    <@ if doc.restrict.element @>

  ```html
  <<$ doc.name | dashCase $>
    <@- for param in doc.params @>
    <$ directiveParam(param.alias or param.name, param.type, '="', '"') $>
    <@- endfor @>>
  ...
  </<$ doc.name | dashCase $>>
  ```
    <@ endif -@>

    <@- if doc.restrict.attribute -@>

  ```html
  <<$ doc.element $>
    <@- for param in doc.params @>
    <$ directiveParam(param.name, param.type, '="', '"') $>
    <@- endfor @>>
  ...
  </<$ doc.element $>>
  ```
    <@ endif -@>

    <@- if doc.restrict.cssClass -@>

  ```html
  <@ set sep = joiner(' ') @>
  <<$ doc.element $> class="
  <@- for param in doc.params -@>
    <$ sep() $><$ directiveParam(param.name, param.type, ': ', ';') $>
  <@- endfor @>"> ... </<$ doc.element $>>
  ```
    <@ endif -@>

  <@- endif @>
  <@ endblock -@>


  <@ if doc.params @>
<h2 id="api" style="clear:both;">API</h2>
<$ paramTable(doc.params, true) $>
  <@ endif @>

  <@ include "lib/events.template.html" @>
<@ endblock @>
